#include "task.h"
#include "interrupt.h"
#include "screen.h"
#include "queue.h"

struct Test {
    QueueNode head;
    int value;
};

Queue g_q;
struct Test g_arr[5];

void KMain()
{
    int n = 0;
    Queue_Init(&g_q);
    for ( n = 0; n < 5; n++ ) {
        g_arr[n].value = n;
        Queue_Add(&g_q, AddrOff(g_arr, n));
    }

    Queue_Rotate(&g_q);
    Queue_Rotate(&g_q);
    PrintIntDec(Queue_IsEmpty(&g_q));
    PrintChar('\n');
    PrintChar('\n');

    while ( Queue_Length(&g_q) > 0 ) {
        struct Test* node = (struct Test*)Queue_Remove(&g_q);
        int v = node->value;

        PrintIntDec(v);
        PrintChar('\n');
    }
    PrintChar('\n');

    //IntModInit();
    //TaskModInit();
    //LaunchTask();
}
